/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.vivo.system.entity.SysUserrole;
import com.vivo.system.dao.SysUserroleDao;

/**
 * 用户角色Service
 * @author jyangye
 * @version 2018-04-16
 */
@Service
@Transactional(readOnly = true)
public class SysUserroleService extends CrudService<SysUserroleDao, SysUserrole> {

    @Autowired
    private SysUserroleDao sysUserroleDao;

	public SysUserrole get(String id) {
		return super.get(id);
	}
	
	public List<SysUserrole> findList(SysUserrole sysUserrole) {
		return super.findList(sysUserrole);
	}
	
	public Page<SysUserrole> findPage(Page<SysUserrole> page, SysUserrole sysUserrole) {
		return super.findPage(page, sysUserrole);
	}
	
	@Transactional(readOnly = false)
	public void save(SysUserrole sysUserrole) {
		super.save(sysUserrole);
	}
	
	@Transactional(readOnly = false)
	public void delete(SysUserrole sysUserrole) {
		super.delete(sysUserrole);
	}


	@Transactional(readOnly = false)
    public void deleteByUserid(String userId) {
	    sysUserroleDao.deleteByUserid(userId);
    }
}